package org.vineatoum.view.data;

import javax.swing.JPanel;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import com.toedter.calendar.JDateChooser;

import javax.swing.JLabel;
import javax.swing.JTextField;

import org.vineatoum.business.state.Recolte;
import org.vineatoum.controller.IVineaToumController;
import org.vineatoum.model.abstraction.IVineaToumModel;
import org.vineatoum.view.utils.JPanelWrapped;

public class RecolteDataPanel extends JPanelWrapped {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JDateChooser textField_3;
	private Recolte recolte;
	private IVineaToumModel model;
	/**
	 * Create the panel.
	 */
	public RecolteDataPanel(IVineaToumModel model,Recolte r) {
		super();
		this.model = model;
		this.recolte = r;
		setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				FormFactory.DEFAULT_COLSPEC,
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("default:grow"),},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,}));
		
		JLabel lblDate = new JLabel("Date");
		add(lblDate, "2, 2, right, default");
		
		textField_3 = new JDateChooser();
		add(textField_3, "4, 2, fill, default");
		
		JLabel lblNewLabel = new JLabel("Pourcentage R\u00E9colte");
		add(lblNewLabel, "2, 4, right, default");
		
		textField = new JTextField();
		add(textField, "4, 4, fill, default");
		textField.setColumns(10);
		
		JLabel lblCommentaire = new JLabel("Commentaire");
		add(lblCommentaire, "2, 6, right, default");
		
		textField_1 = new JTextField();
		add(textField_1, "4, 6, fill, default");
		textField_1.setColumns(10);
		
		JLabel lblType = new JLabel("Type");
		add(lblType, "2, 8, right, default");
		
		textField_2 = new JTextField();
		add(textField_2, "4, 8, fill, default");
		textField_2.setColumns(10);

	}
	@Override
	public void doWhenWrapperOkClick() {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void doWhenWrapperCancelClick() {
		// TODO Auto-generated method stub
		
	}

}
